'use strict';

function calculate_elements_sum(collection) {
  let result = [];
  result = collection.reduce(function(previous,current){
    return previous+current;
  })
  console.log(result);
  return result;
  //在这里写入代码
}
calculate_elements_sum([1,2,3,4,5]);
module.exports = calculate_elements_sum;